﻿@model ProductEmailAFriendModel
@using Nop.Web.Models.Catalog;
@{
    Layout = "~/Views/Shared/_ColumnsTwo.cshtml";

    //title
    Html.AddTitleParts(Model.ProductName);
    Html.AddTitleParts(T("PageTitle.ProductEmailAFriend").Text);
}
<div class="page email-a-friend-page">
    <div class="page-title">
        <h1>@T("Products.EmailAFriend.Title")</h1>
    </div>
    <div class="page-body">
        @if (Model.SuccessfullySent)
        {
            <div class="result">
                @Model.Result
            </div>
        }
        else
        {
            using (Html.BeginForm())
            {         
            <div class="title">
                <h2><a href="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })" class="product">@Model.ProductName</a></h2>
            </div>
            <div class="message-error">
                @Html.ValidationSummary(true)
            </div>
            <div class="form-fields">
                <div class="inputs-left">
                    <div class="inputs">
                        @Html.LabelFor(model => model.FriendEmail)
                        @Html.TextBoxFor(model => model.FriendEmail, new { @class = "friend-email", placeholder = T("Products.EmailAFriend.FriendEmail.Hint") })
                        @Html.ValidationMessageFor(model => model.FriendEmail)
                    </div>
                    <div class="inputs">
                        @Html.LabelFor(model => model.YourEmailAddress)
                        @Html.TextBoxFor(model => model.YourEmailAddress, new { @class = "your-email", placeholder = T("Products.EmailAFriend.YourEmailAddress.Hint") })
                        @Html.ValidationMessageFor(model => model.YourEmailAddress)
                    </div>
                    @if (Model.DisplayCaptcha)
                    {
                        <div class="captcha-box">
                            @Html.Raw(Html.GenerateCaptcha())
                        </div>
                    }
                </div>
                <div class="inputs-right">
                    <div class="inputs">
                        @Html.LabelFor(model => model.PersonalMessage)
                        @Html.TextAreaFor(model => model.PersonalMessage, new { @class = "personal-message", placeholder = T("Products.EmailAFriend.PersonalMessage.Hint") })
                        @Html.ValidationMessageFor(model => model.PersonalMessage)
                    </div>
                </div>
            </div>
            <div class="buttons">
                <input type="submit" name="send-email" class="button-1 send-email-a-friend-button" value="@T("Products.EmailAFriend.Button")" />
            </div>
            }
        }
    </div>
</div>
